package j06paochu;

//自定义运行时异常
class ARun extends RuntimeException{
    public ARun() {
    }

    public ARun(String message) {
        super(message);
    }
}

//编译时异常
class PassErr extends Exception{
    public PassErr() {
    }

    public PassErr(String message) {
        super(message);
    }
}

public class J2zidingyi {
    public static void main(String[] args) {
//        throw new ARun();
//        throw new ARun("用户名错误");
        try {
//            if()
            throw new PassErr("密码错误");
        }catch (PassErr e){
            e.printStackTrace();
        }
        System.out.println("end");
    }
}
